[QUIZ] Test your understanding of SQL - Part 3
The test set comes with SQL lessons that give you lots of useful knowledge.
-
Question 1: In SQL, what is the ALTER TABLE clause used for?
-
Use to add, delete and modify columns in an existing table.
-
Used to insert data into tables in a database.
-
Use to delete the table in the database.
-
Used to delete data from tables in the database.
-
Question 2: The HAVING clause can only be used with .
-
Question 3: Which of the following statements is true?
-
TRUNCATE TABLE must be used in conjunction with the WHERE clause.
-
TRUNCATE TABLE has the same function as the DELETE command but has no WHERE clause and is used to delete records from an existing table in SQL.
-
TRUNCATE TABLE deletes the table from the database
-
Question 4: Which of the following SQL statements is correct?
-
SELECT * FROM Sales WHERE Date BETWEEN '10 / 12/2005 'AND' January 01, 2006 '
-
SELECT FROM Sales WHERE Date BETWEEN '10 / 12/2005 'AND' January 01, 2006 '
-
SELECT FROM Sales WHERE Date BETWEEN ('10/12/2005', 'January 01, 2006')
-
Question 5: What is the CREATE TABLE statement used for?
-
Create a new database table
-
Create a stored procedure
-
-
Question 6: RDBMS stands for .?
-
Real Database Management System
-
Relational Database Management System
-
Read Database Master System
-
Question 7: Which of the following functions is a set function in SQL?
-
Question 8: Which of the following SQL statements takes the 'Success' string?
-
-
-
SELECT LEFT ('Success is all I need.', 15)
-
Question 9: What does the following SQL statement do:
SELECT Khachhang, COUNT(Dondathang) FROM Sales
GROUP BY Khachhang
HAVING COUNT(Dondathang) >5
-
Select all customers from the Sales table that made more than 5 orders.
-
Select all customers from the Sales table.
-
Select the total number of orders from the Sales table, if this number is greater than 5
-
Question 10: Which of the following SQL statements will select all records with all their columns from a table named Sales?
-
-
SELECT * FROM SALES WHERE OrderID <1
-
-
Question 11: Which of the following SQL statements counts the records in the 'Sales' table?
-
SELECT COUNT (*) FROM Sales
-
SELECT COUNT (*) IN Sales
-
-
SELECT COUNTER (*) FROM Sales
-
Question 12: What is the INSERT command used to do?
-
Question 13: Which of the following SQL statements deletes all records in the Sales table?
-
Question 14: Which element is behind the WHERE clause in SQL?
-
The table name is used to retrieve the record.
-
Conditions need to be met for returned goods.
-
-
Question 15: Which of the following SQL statements correctly writes the syntax?
-
SELECT * FROM Table1 WHERE Column1 => 10
-
SELECT * FROM Table1 WHERE Column1 = = 10
-
SELECT * FROM Table1 WHERE Column1> = 10